const fs = require('fs');
fs.read

function tounicode(data) {
    if(data == '') return '';
    var code2 = [];
    for(var i=0; i<data.length; i++) {
        var str = parseInt(data[i].charCodeAt(0),10).toString(16);

        for (var k = 0; k < str.length; k++) {
            var radix2 = ('0000' + ((('0x' + str[k]) | 0).toString(2))).slice(-4);
            code2 += radix2
        }
    }

    return code2;
}



function Sys2HZ(hanzi) {
    var code = tounicode(hanzi);
    var radix = '';
    var resulet = '';
    if (!code) return;


    for (var s = 0, e = 4; s < code.length;) {
        var radix16 = (('0b' + code.slice(s, e)) | 0b0000).toString(16);
        radix += radix16;
        s = e;
        e += 4;
    }

    for (var ss = 0, se = 4; ss < radix.length;) {
        resulet += '\\u' + radix.slice(ss, se);
        ss = se;
        se += 4;
    }
}

